package com.hotel.api.mapper;

import com.hotel.api.entity.Suggestion;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SuggestionMapper {
    int insert(Suggestion record);

    List<Suggestion> selectAll();

    // 根据uid查询个人意见信息
    List<Suggestion> selectByUid(int uid);

    // 根据state查询意见信息
    List<Suggestion> selectAllByState(int state);

    // 根据id查询意见信息
    Suggestion selectOneById(int id);

    // 更新意见信息
    int update(Suggestion suggestion);

}